Component({

  properties: {
    data: {
      type: Object,
      value: {}
    }
  },
  options: {
    styleIsolation: 'apply-shared'
  },
  data: {
    // imgUrls2: [
    //   'https://hbimg.huabanimg.com/9abd8e7d768e6bb070de86c09671b73c81de118d43df2-xahAjO_fw658?1',
    //   'https://hbimg.huabanimg.com/9abd8e7d768e6bb070de86c09671b73c81de118d43df2-xahAjO_fw658?2',
    //   'https://hbimg.huabanimg.com/9abd8e7d768e6bb070de86c09671b73c81de118d43df2-xahAjO_fw658?3'
    // ],
    swiperIdx: 0
  },

  methods: {
    bindChange (e) {
      this.setData({
        swiperIdx: e.detail.current
      })
    },
    previewImg(ev) {
      let { item } = ev.currentTarget.dataset;
      wx.previewImage({
        current: item, // 当前显示图片的http链接
        urls: this.data.data // 需要预览的图片http链接列表
      })
    }
  }

})